home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
TCL1
/
__MANDEL
/
MANDELBR
/
CMANDELA.C
next >
Wrap
Text File
|
1992-05-31
|
1KB
|
85 lines
/*****
* CMandelApp.c
*****/
#include "CMandelApp.h"
#include "CMandelDoc.h"
#include <Commands.h>
extern OSType gSignature;
#define kExtraMasters 4
#define kRainyDayFund 20480
#define kCriticalBalance 20480
#define kToolboxBalance 20480
void CMandelApp::IMandelApp(void)
{
CApplication::IApplication( kExtraMasters, kRainyDayFund,
kCriticalBalance, kToolboxBalance);
CApplication::cMaxSleepTime = 10;
}
void CMandelApp::SetUpFileParameters(void)
{
inherited::SetUpFileParameters(); /* Be sure to call the default method */
sfNumTypes = 2;
sfFileTypes[0] = 'TEXT';
sfFileTypes[1] = 'DATA';
gSignature = '????';
}
void CMandelApp::DoCommand(
register long theCommand) /* Command number */
{
if (theCommand == cmdAbout) {
ZapMouseRgn();
SetCursor(&arrow);
NoteAlert(2048, NULL);
}
else
inherited::DoCommand(theCommand);
}
void CMandelApp::CreateDocument()
{
CMandelDoc *theDocument = NULL;
TRY
{
theDocument = new(CMandelDoc);
theDocument->IMandelDoc(this, TRUE);
theDocument->NewFile();
}
CATCH
{
if (theDocument) theDocument->Dispose();
}
ENDTRY;
}
void CMandelApp::OpenDocument(SFReply *macSFReply)
{
CMandelDoc *theDocument = NULL;
TRY
{
theDocument = new(CMandelDoc);
theDocument->IMandelDoc(this, TRUE);
theDocument->OpenFile(macSFReply);
}
CATCH
{
if (theDocument) theDocument->Dispose();
}
ENDTRY;
}